Memory system utilizing a connection condition of an interface to transmit data

ABSTRACT

A memory system includes an interface, a storage, and a controller. The interface is configured to connect to a plurality of initiators. The storage is configured to store data. The controller is configured to refer to a connection condition of the interface and transmit data to be transmitted to an initiator being connected from the storage.

CROSS-REFERENCE TO RELATED APPLICATIONS

This application claims the benefit of U.S. Provisional Application No. 62/008,264, filed Jun. 5, 2014, the entire contents of which are incorporated herein by reference.

FIELD

Embodiments described herein relate generally to a memory system.

BACKGROUND

Memory systems with a controller for controlling reading and writing of data from and into a flash memory are provided.

BRIEF DESCRIPTION OF THE DRAWINGS

A general architecture that implements the various features of the embodiments will now be described with reference to the drawings. The drawings and the associated descriptions are provided to illustrate the embodiments and not to limit the scope of the invention.

FIG. 1 is a block diagram showing a configuration example of a memory system according to a first embodiment.

FIG. 2 is a timing chart showing an example of a connection operation according to the first embodiment.

FIG. 3 shows an example of a command management table according to the first embodiment.

FIG. 4 schematically shows an example of a data transmission operation according to the first embodiment.

FIG. 5 shows an example of a structure of data received from a NAND controller by a data buffer reception controller according to the first embodiment.

FIG. 6 shows an example of a structure for obtaining a data reception state and the number of consecutive sectors according to the first embodiment.

FIG. 7 is a flowchart showing an example of an operation of a command manager according to the first embodiment.

FIG. 8 schematically shows an example of a process in which an optimal command is selected by the command manager when notification indicating a connection is received, according to the first embodiment.

FIG. 9 schematically shows an example of a process in which an initiator is selected by the command manager when notification indicating no connection is received, according to the first embodiment.

FIG. 10 shows an example of transfer of control signals according to the first embodiment.

FIG. 11 is a flowchart showing an example of data transmission control of a memory system according to the first embodiment.

FIG. 12 schematically shows an example of a process in which a command manager according to a second embodiment selects an optimal command.

DETAILED DESCRIPTION

Various embodiments will be described hereinafter with reference to the accompanying drawings.

In general, according to one embodiment, a memory system comprises an interface, a storage, and a controller. The interface is configured to connect to a plurality of initiators. The storage is configured to store data. The controller is configured to refer to a connection condition of the interface and transmit data to be transmitted to an initiator being connected from the storage.

In this specification, some components are expressed by two or more terms. These terms are merely examples. The components may be further expressed by another or other terms. The other components which are not expressed by two or more terms may be expressed by another or other terms.

(First Embodiment)

FIG. 1 shows an example of a memory system 100 according to a first embodiment. The memory system 100 is an example of each of a semiconductor system and a semiconductor device, and is, for example, a solid-state drive (SSD). It should be noted that the memory system 100 is not limited to this. The memory system 100 is an example of a target.

The memory system 100 is connected to a plurality of initiators 200 through an interface. Each of the initiators 200 is an example of each of an external device, an information-processing device and an information-processing module. Although the interface is, for example, a Serial Attached SCSI (SAS) interface, it is not limited to this. The memory system 100 can perform two-way simultaneous communications with the initiators 200 through the interface.

When data is transmitted and received between the memory system 100 and each initiator 200, a connection operation based on a predetermined protocol is performed between a connection destination and a connection source.

FIG. 2 shows an example of a connection operation between the memory system 100 and each initiator 200. It should be noted that in the following description, the side of requesting the connection operation will be called a connection source, and that of receiving the request of the connection operation will be called a connection destination. Here, each of the memory system 100 and the initiator 200 can be both the connection source and the connection destination. That is, the memory system 100 may be the connection source and the initiator 200 may be the connection destination. Alternatively, the initiator 200 may be the connection source, and the memory system 100 may be the connection destination.

As shown in FIG. 2, if a connection source Z1 transmits a data frame, the connection source Z1 issues a connection request by transmitting an OPEN address frame to the side to which a connection is requested (hereinafter referred to as connection destination) Z2. When the connection destination Z2 receives the OPEN address frame from the connection source Z1, contents of the received OPEN address frame are confirmed.

If the connection destination Z2 determines that it can be connected to the connection source Z1, the connection destination Z2 transmits an OPEN_ACCEPT primitive to the connection source Z1. When the connection source Z1 receives the OPEN_ACCEPT primitive from the connection destination Z2, connection processing for transmitting and receiving data between the connection source Z1 and the connection destination Z2 is completed.

After determining an empty state of a data buffer, the connection destination Z2 transmits RRDY primitives for receivable frames to the connection source Z1. The connection source Z1 can transmit data frames equivalent to the RRDY primitives received from the connection destination Z2 to the connection destination Z2. In FIG. 2, for example, three SSP data frames are transmitted from the connection source Z1 to the connection destination Z2. The connection destination Z2 transmits ACKs for the received SSP data frames to the connection source Z1. Transmission control of the data frames is performed in this manner.

It should be noted that the connection source Z1 can also transmit the RRDY primitives for receivable frames to the connection destination Z2 in the same manner after determining an empty state of a data buffer. Then, the connection destination Z2 can transmit data frames (SSP data frames) equivalent to the RRDY primitives received from the connection source Z1 to the connection source Z1.

This protocol allows data to be transmitted and received between the connection source Z1 and the connection destination Z2 using an SAS interface. Even if both the connection source Z1 and the connection destination Z2 get in a connection state in response to transmission of the Open address frame (connection request) from either of them, it is allowed also in the protocol of the SAS interface that data can be transmitted if credit of the RRDY primitive is present. That is, even if both of them get in the connection state in response to the connection request from the connection source Z1, data can be transmitted from the connection destination Z2 to the connection source Z1.

If data to be transmitted is not present in the connection source Z1 or the connection destination Z2, the connection source Z1 transmits a DONE primitive to the connection destination Z2. Then, a connection is closed by transmitting CLOSE primitives between the connection source Z1 and the connection destination Z2.

For example, in the communication method using an SAS interface as described above, a connection operation for determining the connection source Z1 and the connection destination Z2 is needed. A handshake is performed in accordance with a condition (for example, a communication condition) of both the connection source Z1 and the connection destination Z2. Thus, the time of the connection operation is associated with transfer efficiency of data. For example, the time required for the connection operation in FIG. 2 is a period of time obtained by adding time T1 between transmission of the OPEN address frame by the connection source Z1 and reception of OPEN_ACCEPT by the connection source Z1 to time T2 between transmission of DONE by the connection source Z1 and reception of CLOSE by the connection source Z1.

Thus, the memory system 100 can reduce the number of connection operations (total time of connection operations) by transmitting data as much as possible in one connection, and the transfer efficiency of data can be improved. Hereinafter, an example of the memory system 100, in which the transfer efficiency of data can be improved from the above viewpoint, will be described.

(Structure of Memory System 100)

As shown in FIG. 1, the memory system 100 can be connected to the plurality of initiators 200 through an expander 300. The memory system 100 receives commands (for example, read commands) from each of the plurality of initiators 200, and transmits data corresponding to the commands to the initiator 200 which issued the commands.

Specifically, the memory system 100 comprises a memory 10, a NAND controller 11, a data buffer 12, a data buffer reception controller 13, a data buffer transmission controller 14, communication ports 15A-15N, connection controllers 16A-16N, command execution controllers 17A-17N and data frame generators 18A-18N.

The memory 10 is an example of a non-volatile memory, and stores data. The memory 10 comprises, for example, a plurality of NAND flash memories 10A-10M. Each of the NAND flash memories 10A-10M is each of an example of a memory, a semiconductor memory and a non-volatile memory. It should be noted that the memory 10 may be constituted of a NAND flash memory. Also, the memory is not limited to the NAND flash memory.

The NAND controller 11 is an example of each of a memory controller, and a first controller. The NAND controller 11 reads data from the memory 10 in, for example, a cluster unit. It should be noted that a cluster includes, for example, eight sectors.

The NAND controller 11 reads a plurality of data items corresponding to the plurality of commands in parallel from the memory 10 (for example, plurality of NAND flash memories 10A-10M) in response to a plurality of read commands from the plurality of initiators 200. Also, the NAND controller 11 may read in parallel, from the memory 10, a plurality of data items corresponding to a plurality of read commands issued from, for example, one initiator 200. The NAND controller 11 temporarily stores the plurality of read data items for each predetermined unit (for example, for each sector unit) in the data buffer 12.

The data buffer 12 is an example of each of a storage, a data transfer unit, a memory and a volatile memory. The data buffer 12 is, for example, a so-called read buffer. Although the data buffer 12 is, for example, a static random access memory (SRAM), it may be a dynamic random access memory (DRAM). Also, the data buffer 12 may be other types of memories, and is not especially limited.

The data buffer 12 stores data read from the memory 10 by the NAND controller 11 for each predetermined unit (for example, for each sector unit). A plurality of data items read in parallel from the memory 10 in response to the read commands from the plurality of initiators 200 are stored in the data buffer 12, for example, for each predetermined unit in the reading order.

The data buffer reception controller 13 extracts predetermined information from data when the data is stored from the NAND controller 11 to the data buffer 12. Specifically, the data buffer reception controller 13 extracts header information H (see FIG. 5) included in data to be transmitted from the NAND controller 11 to the data buffer 12, and information concerning the length of the data (for example, the number of sectors), etc.

The data buffer transmission controller 14 is an example of a second controller. It manages connection conditions between communication ports 15A-15N and the plurality of initiators 200, and transmits (transfers) data stored in the data buffer 12 to the initiators 200. The data buffer transmission controller 14 according to this embodiment comprises a command manager 21, a connection manager 22 and an execution instruction unit 23.

The command manager 21 manages the progress situation of the commands received from each of the plurality of initiators 200. Specifically, the command manager 21 comprises, for example, a command management table T (see FIG. 3), and manages command information of a plurality of commands received from the plurality of initiators 200 and storage information of data read from the memory 10 in response to the commands in association with each other.

The connection manager 22 manages connection conditions between communication ports 15A-15N and the plurality of initiators 200. That is, the connection manager 22 refers to the connection conditions of communication ports 15A-15N, and detects the initiator 200 connected to communication ports 15A-15N.

The execution instruction unit 23 is an example of a controller, and transmits data stored in the data buffer 12 to the initiator 200 corresponding to the data based on an output from the command manager 21 and the connection manager 22. It should be noted that in another viewpoint, the command manager 21 and the execution instruction unit 23 may be collectively called a controller. Also, in another viewpoint, the command manager 21, the execution instruction unit 23, the connection controllers 16A-16N, the command execution controllers 17A-17N and the data frame generators 18A-18N may be collectively called a controller. Also, a controller is not limited to the above controllers, and a controller comprising the connection manager 22 may be called a controller. It should be noted that functions and operations of the command manager 21, the connection manager 22 and the execution instruction unit 23 will be described in detail.

Each of the plurality of communication ports 15A-15N is an example of an interface. Each of communication ports 15A-15N can be connected to the plurality of initiators 200 through the expander 300, and can perform two-way communications with the initiators 200 being connected. For example, the SAS interface is used for each of communication ports 15A-15N. It should be noted that an interface may be constituted of, for example, a communication port.

Each of the connection controllers 16A-16N obtains connection information concerning a connection between the corresponding communication ports 15A-15N and the initiators 200, and indicates the connection information to the connection manager 22. It should be noted that the connection information includes information concerning the presence of connection between the communication port (any of communication ports 15A-15N) and the initiator 200, and information as to which initiator 200 the communication port is connected to if it is connected to the initiator 200.

Instructions concerning data transfer are indicated from the execution instruction unit 23 to each of the command execution controllers 17A-17N. Each of the data frame generators 18A-18N generates a data frame from data of a frame unit received from the data buffer 12. Each of the data frame generators 18A-18N transmits the generated data frame to the initiator 200 through the corresponding communication port (any of communication ports 15A-15N).

It should be noted that as shown in FIG. 1, a set of the connection controller 16A, the command execution controller 17A and the data frame generator 18A are configured to perform data transmission in response to communication port 15A. Also, the other communication ports 15B-15N have similar structures.

Next, the data buffer transmission controller 14 will be described in more detail.

As described above, the data buffer transmission controller 14 comprises the command manager 21, the connection manager 22, and the execution instruction unit 23.

FIG. 3 shows an example of the command management table T managed by the command manager 21. On the command management table T, command information concerning a plurality of commands from the plurality of initiators 200 and storage information concerning data read from the memory 10 in response to the commands are managed in association with each other.

The command information includes, for example, TAG type, port type, initiator type, command elapsed time information and other information. The TAG is an identification code assigned to each command to identify each command. That is, the TAG type may be called a command type. Information concerning the TAG assigned to each command is stored in the TAG type. The data buffer transmission controller 14 identifies to which command each information corresponds by referring to the TAG type.

The port type is information for identifying to which of communication ports 15A-15N the communication port which received each command (communication port connected to the initiator 200 which issued each command) corresponds. For example, an identification number of each of communication ports 15A-15N is stored in the port type. The initiator type is information for identifying to which of the plurality of initiators 200 the initiator 200 which issued each command corresponds. For example, an identification number of each of the initiators 200 is stored in the initiator type. The command elapsed time information is information indicating an elapsed time from reception of a command. The command information is registered by the connection manager 22.

On the other hand, the storage information includes, for example, transferable sector number information, host access pointer (HAP) information, media access pointer (MAP) information and other reception data management information. The transferable sector number information is information concerning the amount of data (for example, the number of sectors) which is read into the data buffer 12 in response to each command and can be transmitted (transferred) from the data buffer 12 to the initiator 200. The transferable sector number information is an example of transferable amount information.

The HAP refers to the amount of data (for example, the number of sectors) already transmitted (transferred) from the data buffer 12 to the initiators 200 in response to each command. That is, the HAP information includes information indicating the amount of data (for example, the number of sectors) which has been transmitted from the data buffer 12 to the initiators 200 in response to each command.

On the other hand, the MAP refers to the amount of data (for example, the number of sectors) read from the memory 10 to the data buffer 12. That is, the MAP information includes information indicating the amount of data (the number of sectors) read from the memory 10 to the data buffer 12. Thus, the difference between the MAP and the HAP corresponds to the amount of data which is left in the data buffer 12 at that moment, and can be transmitted from the data buffer 12 to the initiators 200.

As shown in FIG. 1, the connection manager 22 manages (monitors) connection conditions between communication ports 15A-15N and the initiators 200 based on an output from the connection controllers 16A-16N. That is, the connection manager 22 detects the initiator 200 being connected (initiator 200 in a connection state) from a plurality of initiators 200. The connection manager 22 transmits information concerning the detected initiator 200 being connected (for example, identification number of the initiator 200) to the execution instruction unit 23.

The execution instruction unit 23 can continuously transmit a plurality of data items to be transmitted to the initiator 200 being connected from the data buffer 12 based on an output from the connection manager 22, regardless of a storing order from the memory 10 in the data buffer 12. In this embodiment, the execution instruction unit 23 continuously transmits the plurality of data items of the predetermined unit (for example, sector unit) to be transmitted to the initiator 200 being connected from the data buffer 12 based on the output from the connection manager 22, regardless of the storing order in the data buffer 12.

FIG. 4 schematically shows an example of data transmission operation according to this embodiment. It should be noted that of the plurality of communication ports 15A-15N, an operation of communication port 15A will be described as a representative in the following description. Operations of the other communication ports 15B-15N are similar to that of communication port 15A.

As shown in FIG. 4, the plurality of initiators 200 comprises a first initiator 200A and a second initiator 200B. For example, first data D1 to be transmitted to the first initiator 200A, second data D2 to be transmitted to the second initiator 200B and third data D3 to be transmitted to the first initiator 200A are read from the memory 10 and stored in the data buffer 12 in this order. In this embodiment, when the connection manager 22 detects that the first initiator 200A is connected, the execution instruction unit 23 continuously transmits the first data D1 and the third data D3 to the first initiator 200A.

Also, in another operation example, when communication port 15A and the first initiator 200A are connected in response to the request from the first initiator 200A, the execution instruction unit 23 detects the presence of data to be transmitted to the first initiator 200A in the data buffer 12, and if the data to be transmitted to the first initiator 200A is present, the execution instruction unit 23 transmits the data to the first initiator 200A.

A specific example of the transmission operation will be hereinafter described.

When the NAND controller 11 reads data from the plurality of NAND flash memories 10A-10M, the memory system 100 parallelizes and processes a plurality of read commands to make a reading latency apparently absent. Thus, data is not stored in the data buffer 12 from head data for each sector, for each read command.

Then, the command manager 21 manages, for each read command, the progress of data reception to the data buffer 12, and the amount of data which can be transferred to the initiators 200.

Also, the data buffer 12 can preset the storage position of data (what area the data is written in) for each read command. This allows the continuity of data to be transmitted to the initiator 200 to be secured, even if storage from the NAND flash memories 10A-10M to the data buffer 12 is not performed for each command from the head data.

FIG. 5 shows an example of a structure of data received from the NAND controller 11 by the data buffer reception controller 13. The unit of data received from the NAND controller 11 by the data buffer reception controller 13 is, for example, one cluster. One cluster includes, for example, eight sectors of logical block address (LBA) [2:0]=3′b000 to LAB[2:0]=3′b111. Also, each sector includes a data portion and the header information H to be added to the head of the data portion. The header information H includes the LBA, TAG for identifying a read command and a final sector flag.

FIG. 6 shows an example of a structure for managing a data reception state of the data buffer 12, and the number of sectors which can be transferred to the initiator 200 (for example, the number of consecutive sectors which can be transferred). The data buffer reception controller 13 comprises a header information extracting unit 31 and a byte counter 32. When receiving data of a format shown in FIG. 5 from the NAND controller 11, the data buffer reception controller 13 detects the TAG from the header information H, and updates a reception state of data corresponding to the detected TAG (storage information of the command management table T).

When the update of the command management table T ends, the header information H is removed, and only a data portion is stored in the data buffer 12. It should be noted that data smaller than a cluster is not present except for a head cluster and a final cluster for the read command.

The command manager 21 comprises, for each of TAG0-TAGN, an area (sector counter) R0-RN in which a sector count value of each cluster can be stored. When storage in the data buffer 12 for each data item of a received sector unit is completed, the data buffer reception controller 13 outputs sector reception completion notification from the byte counter 32. The sector counter of a cluster for each TAG is incremented based on the sector reception completion notification. Which cluster contains the sector counter to be incremented is determined based on upper bits other than low three bits of the LBA added to the header information H (portion corresponding to identification of clusters).

When sector counters R0-RN of each cluster receives a sector including LBA[2:0]-3′b111 in the header information H, or when it receives data including the final sector flag in the header information H, the storage of data in the data buffer 12 is considered to be completed.

Each of cluster pointers P0-PN refers to sectors sequentially from the head sector in which the stored flag indicating the completion of data storage is asserted, and increments a cluster pointer after the number of sector counts indicated by the cluster pointer is reflected in a corresponding MAP (any of MAP0-MAPN). Each of MAP0-MAPN indicates the number of consecutive sectors for the sectors stored in the data buffer 12 with respect to each read command.

On the other hand, if the storage of the number of sector counts displayed in cluster pointers P0-PN has not been completed (if the stored flag has not been asserted), cluster pointers P0-PN keep displaying the values, which are held until the reception of the data of the cluster ends.

Such a structure allows the number of sectors stored from the head sector to be reflected in MAP0-MAPN. Accordingly, the command manager 21 can manage the number of transferable sectors which can be continuously output to each of the initiators 200.

When transfer start of data is instructed by the execution instruction unit 23, the command execution controller 17A indicates the transfer start to the data frame generator 18A. The data frame generator 18A transmits a data frame to the initiator 200 through communication port 15A (data transfer).

When the transmission of the data frame to the initiator 200 ends, the corresponding HAP is incremented in a transfer byte unit (frame unit). Thus, the difference between the MAP and HAP corresponds to the number of transferable sectors. The number of transferable sectors is managed (registered and updated) in the command manager 21 (command management table T) along with the MAP and HAP.

Such a structure allows the command manager 21 to manage, for each read command, the progress of data reception to the data buffer 12, and the amount of data which can be transferred to the initiator 200. Thus, the command manager 21 can manage a plurality of data items (for example, plurality of data items of the predetermined unit) to be continuously transmitted in the data buffer 12 in response to each command.

When transmitting a data item of a predetermined unit (for example, sector unit) corresponding to a command to the initiator 200 being connected, the data buffer transmission controller 14 continuously transmits another data item of the predetermined unit corresponding to the same command to the initiator 200 being connected based on the output from the command manager 21. That is, if the plurality of data items of the predetermined unit are stored in response to a command, the data buffer transmission controller 14 continuously transmits the plurality of data items of the predetermined unit to the initiator 200 being connected.

Also, the data buffer transmission controller 14 may continuously transmit, from the data buffer 12, a plurality of data items corresponding to a plurality of commands and to be transmitted to the initiator 200 being connected based on the output of the connection manager 22. That is, if a plurality of data items corresponding to a plurality of commands are to be transmitted to the same initiator 200 on the command management table T of the command manager 21, the plurality of data items may be continuously transmitted in one connection.

Also, the data buffer transmission controller 14 according to this embodiment selects a command optimal for data transfer (command to be processed earliest, hereinafter referred to as optimal command) based on a connection condition of communication port 15A managed by the connection manager 22, and the command information and storage information managed by the command manager 21, and transmits the data stored in the data buffer 12 to the initiator 200 being connected in response to the selected command. The selection of the optimal command will be described in detail.

FIG. 7 shows an example of an operation of the data buffer transmission controller 14. It should be noted that the processing of selecting an optimal command of communication port 15A will be described as a representative again. The processing of the other communication ports 15B-15N is similar to that of communication port 15A.

The command manager 21 receives notification (reference request) including a connection type (presence of connection) from the connection manager 22 (ST101). The command manager 21 determines whether communication port 15A is connected to the initiator 200 or not based on the notification (ST102). The reference request includes, for example, the presence of connection, a port type, and an initiator type of the initiator 200 being connected if it is connected.

If the command manager 21 determines that communication port 15A is connected to the initiator 200 (YES in ST102), a read command to be first processed with respect to the initiator 200 being connected (optimal command) is selected using the initiator type included in the reference request (ST103).

FIG. 8 shows an example of processing of selecting an optimal command. The command manager 21 selects an optimal command from a plurality of read commands based on a connection condition, the command information and the storage information of communication port 15A. In this embodiment, the command manager 21 selects an optimal command based on elapsed time information included in the storage information.

Specifically, the command manager 21 detects whether read commands corresponding to the initiator 200 being connected are present or not using the initiator type of the command information to be managed (S11). That is, read commands associated with identification information identical to the initiator 200 being connected are detected. Thus, read commands (TAG) corresponding to the initiator 200 being connected are extracted. Next, the command manager 21 searches the extracted read commands for commands including the number of transferable sectors (S12). Consequently, the read commands including data which can be transmitted to the initiator 200 being connected are extracted.

Next, the command manager 21 searches read commands including data which can be transmitted to the initiator 200 being connected for a read command with the longest command elapsed time (S13). Then, the command manager 21 selects the read command with the longest command elapsed time as an optimal command from the read commands including data which can be transmitted to the initiator 200 being connected.

Also, the command manager 21 sets the transmission order of a plurality of read commands including data which can be transmitted to the initiator 200 being connected in the order of longer lengths of command elapsed times. As shown in FIG. 7, the command manager 21 indicates optimal command information including the selected optimal command to the connection manager 22 (ST104).

On the other hand, if the command manager 21 determines that communication port 15A is not connected to the initiator 200 (NO in ST102), it confirms whether data to be transmitted to any initiators 200 which can be connected to communication port 15A is stored in the data buffer 12 or not using the communication port type of communication port 15A included in the reference request (ST105).

If the command manager 21 determines that the data to be transmitted is stored (YES in ST106), it selects an initiator 200 to be connected and indicates the initiator type of the initiator 200 to the connection manager 22 (ST107).

The flow from ST105 to ST107 will be further described in detail with reference to FIG. 9. FIG. 9 shows an example of a process in which the command manager 21 selects the initiator 200 when notification indicating no connection is received from the connection manager 22.

As shown in FIG. 9, the command manager 21 searches whether an initiator 200 corresponding to a communication port type identical to that of communication port 15A included in the reference request is present or not using the communication port type in managed command information (S21). Accordingly, an initiator 200 to which communication port 15A is connected is extracted.

Next, the extracted initiators 200 are searched for commands including the number of transferable sectors (S22). As a result, read commands including data which can be transmitted to the connectable initiator 200 are extracted. Next, the command manager 21 searches the read commands including the data which can be transmitted to the connectable initiator 200 for a read command with the longest command elapsed time (S23). Then, the command manager 21 selects the read command with the longest command elapsed time as an optimal command from the read commands including the data which can be transmitted to the connectable initiator 200.

The command manager 21 transmits the initiator type of the initiator 200 corresponding to the selected command to the connection manager 22. When receiving the initiator type from the command manager 21, the connection manager 22 issues an OPEN request to the connection controller 16A. Accordingly, communication port 15A and the initiator 200 are connected. The processing after communication port 15A is connected in this manner is similar to the above-described processing.

On the other hand, as shown in FIG. 7, if the command manager 21 determines that data is not stored in the data buffer 12 (NO in ST106), it indicates that the initiator 200 to which data is transmitted is not present in the connection manager 22 (ST108). In this case, the connection manager 22 issues a CLOSE request to the connection controller 16A.

Next, an example of flows of control signals between the connection controllers 16A-16N, the command manager 21, the connection manager 22, the execution instruction unit 23 and the command execution controllers 17A-17N will be described with reference to FIG. 10. FIG. 10 shows an example of transfer of the control signals.

Each of the connection controllers 16A-16N comprises a function of returning a response such as OPEN_ACCEPT in response to the OPEN request from an initiator 200. Also, each of the connection controllers 16A-16N indicates a connection condition to the connection manager 22. Notification (reference request) of the connection condition includes, for example, the presence of connection, a communication port type and an initiator type.

The connection manager 22 understands a connection condition of each of communication ports 15A-15N based on the reference request indicated by the connection controllers 16A-16N. The connection manager 22 indicates the reference request to the command manager 21 based on the understanding of the connection condition of each of communication ports 15A-15N.

If an initiator 200 being connected is present, the connection manager 22 refers to the command management table T, and confirms whether a sector which can be transmitted to the initiator 200 being connected is present or not. If the sector which can be transmitted is present, the connection manager 22 indicates the initiator type of the initiator 200 being connected as an execution request to the execution instruction unit 23.

The execution instruction unit 23 indicates the initiator type indicated from the connection manager 22 to the command manager 21. If the notification is received from the execution instruction unit 23, the command manager 21 selects an optimal command, and indicates, to the execution instruction unit 23, command information to be transmitted. The execution instruction unit 23 sequentially reads data from the data buffer 12 by indicating command information to the command execution controller 17A-17N. Then, the data frame generator 18A-18N generates a data frame based on the data read from the data buffer 12 to transmit it to the initiator 200.

If the command execution controller 17A-17N transfers data equivalent to the number of data items which can be transmitted (number of transferable sectors) to the initiator 200 based on execution information indicated from the execution instruction unit 23, it indicates completion notification of data transfer to the execution instruction unit 23. By such processing, the plurality of data items of the predetermined unit stored in the data buffer 12 in response to a command are collectively transmitted to the initiator 200 being connected regardless of the storing order in the data buffer 12.

After this, as long as the connection to the initiator 200 continues, the memory system 100 repeats the above transmission operation, and continuously transmits another or other commands of the same initiator 200 (initiator 200 being connected). As a result, a plurality of data items corresponding to a plurality of commands and to be transmitted to the same initiator 200 are collectively transmitted from the data buffer 12.

Also, if the connection is being closed, the connection manager 22 refers to the command management table T, and searches whether data corresponding to unfinished commands stored in the data buffer 12 is stored or not. If the data corresponding to the unfinished commands is present, the connection manager 22 indicates the initiator type of the command to a connection controller 16A-16N and issues an OPEN request.

The connection controller 16 transmits an OPEN address frame to the initiator 200 which the indicated initiator type shows in response to the received OPEN request. When a connection is established, the connection manager 22 indicates command information corresponding to the unfinished commands to a command execution controller 17A-17N through the execution instruction unit 23. Then, data transfer from the data buffer 12 to the initiator 200 is started. The data frame generators 18A-18N sequentially perform data transmission in accordance with command information of a command execution controller 17A-17N, a transmission start address of the data buffer 12 and the number of transmittable bytes.

FIG. 11 shows an example of data transmission control of the memory system 100. It should be noted that the processing concerning communication port 15A will be described as a representative again. Similar processing is performed also in the other communication ports 15B-15N.

As shown in FIG. 11, the connection the controller 16A indicates a connection condition to the connection manager 22 (ST201). The connection manager 22 detects the presence of connection between communication port 15A and an initiator 200 based on connection conditions indicated from the connection controller 16A (ST202). If the connection manager 22 determines that communication port 15A is in a connection state (YES in ST202), it confirms with the command manager 21 whether data to be transferred to the initiator 200 which is connected to communication port 15A is stored in the data buffer 12 or not (ST203).

The command manager 21 determines whether data to be transmitted to the initiator 200 being connected is stored in the data buffer 12 or not (ST204). If the command manager 21 determines that the data is stored in the data buffer 12 (YES in ST204), it indicates optimal command information to the connection manager 22 (ST205).

The connection manager 22 indicates an execution request to the execution instruction unit 23 (ST206). The execution instruction unit 23 reads execution information from the command manager 21 based on the execution request. The execution instruction unit 23 indicates the read execution information to the command execution controller 17A (ST207).

The command execution controller 17A transfers data equivalent to transferable sectors based on the execution information, and indicates completion notification to the execution instruction unit 23 when the transfer ends (ST208). Then, the processing returns to step ST202.

On the other hand, in step ST204, if the command manager 21 determines that data is not stored in the data buffer 12 (NO in ST204), the command manager 21 transmits notification of no data to the connection manager 22. The connection manager 22 which received the notification indicates a CLOSE request to the connection controller 16A (ST209). The connection controller 16A closes the connection between communication port 15A and the initiator 200 by a CLOSE sequence (ST210). Then, the processing returns to step ST202.

Also, in step ST202, if the connection manager 22 determines that a connection between communication port 15A and the initiator 200 is not present (NO in ST202), it confirms storage conditions of data concerning read commands corresponding to communication port 15A with the command manager 21 (ST211).

The command manager 21 determines whether the data of the read commands corresponding to communication port 15A is stored in the data buffer 12 or not (ST212). If the command manager 21 determines that the data is stored in the data buffer 12 (YES in ST212), an OPEN request is issued to the connection controller 16A to connect the data to the initiator 200 to be transmitted (ST213).

The connection controller 16A establishes a connection to the initiator 200 through communication port 15A by an OPEN sequence (ST214). The processing returns to step ST205, and subsequent processing is performed as described above.

It should be noted that the command manager 21 determines in step ST212 that data is not stored in the data buffer 12 (NO in ST212), the processing returns to already-described step ST209, and subsequent processing is performed as described above.

According to the memory system 100 having such a structure, data transfer efficiency can be improved. Here, a memory system in which data corresponding to read commands received from an initiator is sequentially stored from a non-volatile memory to a data buffer, and the data is transmitted to the initiator in the storing order is considered for comparison. To improve read efficiency from the non-volatile memory, data corresponding to a plurality of read commands is read in parallel from the non-volatile memory. Thus, the storing order in a data buffer is not guaranteed. In the case where data of different initiators are mixed and stored in a data buffer, when data transmission is controlled in the storing order in the data buffer, connection operations need to be performed for each initiator. Thus, connection operations may frequently occur depending on the storage conditions of the data in the data buffer.

On the other hand, the memory system 100 of this embodiment comprises an interface (communication port 15A) which can be connected to the plurality of initiators 200, a storage (data buffer 12) configured to store data, and a controller configured to refer to a connection condition of the interface and transmit data to be transmitted to an initiator 200 being connected from the storage. Such a structure allows the number of connection operations to be reduced, since a lot of data (a plurality of data items) can be transmitted in one connection. Accordingly, the data transfer efficiency can be improved.

In this embodiment, the controller refers to a connection condition of the interface and continuously transmits a plurality of data items corresponding to a plurality of commands and to be transmitted to an initiator 200 being connected from the storage regardless of the storing order in the storage. According to such a structure, a plurality of data items corresponding to a plurality of commands can be transmitted in one connection, and the number of connection operations can be further reduced.

In the storage of this embodiment, a plurality of data items are read in parallel from the memory, and temporarily stored for each predetermined unit in response to commands from the plurality of initiators 200. The controller continuously transmits the plurality of data items of the predetermined unit to be transmitted to an initiator 200 being connected from the storage based on an output from the connection manager 22 regardless of the storing order in the storage. According to such a structure, the plurality of data items of the predetermined unit can be continuously transmitted from the storage in one connection, and the number of connection operations can be reduced.

In the storage of this embodiment, the first data D1 to be transmitted to the first initiator 200A, the second data D2 to be transmitted to the second initiator 200B, and the third data D3 to be transmitted to the first initiator 200A are read from the memory in this order and stored. When the connection manager 22 detects that the first initiator 200A is connected, the controller continuously transmits the first data D1 and the third data D3 to the first initiator 200A. Such a structure allows the third data D3 to be transmitted using a connection for transmitting the first data D1. Accordingly, the number of connection operations can be reduced.

In this embodiment, when the interface and the first initiator 200A are connected in response to the request from the first initiator 200A, the controller detects the presence of data to be transmitted to the first initiator 200A in the storage, and if data to be transmitted to the first initiator 200A is present, the controller transmits the data to the first initiator 200A. Such a structure allows the data to be transmitted to the first initiator 200A to be transmitted using a connection according to a request (for example, write request) from the first initiator 200A. Accordingly, the number of connection operations can be reduced.

In this embodiment, the memory system 100 further comprises the command manager 21 configured to manage commands from the plurality of initiators 200 and data stored in the storage in response to the commands in association with each other. When transmitting a data item of a predetermined unit corresponding to a command to an initiator 200 being connected based on an output from the command manager 21, the controller continuously transmits another data item of the predetermined unit corresponding to the same command to the initiator 200 being connected. According to such a structure, it can collectively transmit a plurality of data items (plurality of data items of a predetermined unit) corresponding to a command in one connection. That is, in this embodiment, it can manage and transmit an amount of data which can be transmitted in a command unit. Thus, the number of connection operations can be reduced.

In this embodiment, the controller continuously transmits a plurality of data items corresponding to a plurality of commands and to be transmitted to an initiator 200 being connected from the storage based on an output from the connection manager 22. According to such a structure, first data corresponding to a first command and second data corresponding to a second command can be collectively transmitted in one connection. Thus, the number of connection operations can be reduced.

In this embodiment, the command manager 21 selects a command to be processed earliest based on a connection condition of the interface and the command information. Such a structure allows data corresponding to an optimal command to be transmitted from data to be transmitted to an initiator 200 being connected. Consequently, an optimal transfer order can be set, and the data transfer efficiency can be further improved.

In this embodiment, the command information includes elapsed time information indicating an elapsed time from reception of the command. The command manager 21 selects a command to be processed earliest based on at least a connection condition of the interface and the elapsed time information. Such a structure allows data corresponding to a command to be given priority to be transmitted to the initiator 200 based on the elapsed time from the reception of the command. Thus, the data transfer efficiency can be further improved.

In this embodiment, the command manager 21 selects a command with the longest elapsed time of commands from an initiator 200 being connected as a command to be processed earliest. According to such a structure, data corresponding to the command with a longer elapsed time from the reception of the command can be preferentially transmitted to the initiator 200. Thus, the data transfer efficiency can be further improved.

(Second Embodiment)

Next, the memory system 100 according to a second embodiment will be described. It should be noted that a structure having a function identical or similar to that of the structure of the first embodiment will be denoted by the same reference numbers, and its description will be omitted. Also, the structures other than those to be described below are identical to those in the first embodiment.

FIG. 12 shows an example of a process in which the command manager 21 according to this embodiment selects an optimal command. The command manager 21 selects the optimal command based on the number of transferable sectors included in the storage information. It should be noted that the number of transferable sectors is an example of transferable amount information and data size information.

As shown in FIG. 12, after the command manager 21 finishes the processing of step S31 substantially identical to the above step S21 (see FIG. 9), the command manager 21 selects the optimal command based on the number of transferable sectors (data size information) included in storage information (S32). It should be noted that after the command manager 21 finishes the processing of the step substantially identical to the above step S11 (see FIG. 8) instead of this, the command manager 21 may select the optimal command based on the number of transferable sectors (data size information) included in the storage information.

For example, the command manager 21 selects a read command with the largest number of transferable sectors (with the largest transferable amount) as an optimal command based on the number of transferable sectors. According to such a structure, the memory system 100 can quickly make room for a data storage area of the data buffer 12.

Also, the command manager 21 may select a read command with the smallest number of transferable sectors (with the smallest transferable amount) as an optimal command based on, for example, the number of transferable sectors, or may select a read command to average the number of sectors to be transferred in one connection.

Furthermore, the memory system 100 may comprise a register 21 a (indicated by broken lines in FIG. 1) configured to determine processing for selecting an optimal command in, for example, the command manager 21. The register 21 a is an example of a setting module in which a user can set a method of selecting an optimal command. According to such a structure, a user of, for example, the memory system 100 can change methods of selecting an optimal command in accordance with an individual situation. This increases convenience of the memory system 100.

The memory system 100 according to such a structure allows the transfer efficiency of data to be increased as well as in the first embodiment.

In this embodiment, the command manager 21 manages command information of the command and storage information of data stored in the storage in response to the commands in association with each other, and selects a command to be processed earliest based on a connection condition of the interface, the command information and the storage information. Such a structure allows an appropriate transfer order to be determined based on the storage information, etc., and data transfer efficiency can be improved.

In this embodiment, the storage information includes transferable amount information of data stored in the storage in response to a command. The command manager selects a command to be processed earliest based on at least a connection condition of the interface and the transferable amount information. Such a structure allows an appropriate transfer order to be determined based on the transferable amount information, and the data transfer efficiency can be further improved.

In this embodiment, the command manager selects a command with the largest transferable amount of commands from the initiator 200 being connected as a command to be processed earliest. Since such a structure allows an amount of data which can be transmitted to the initiator 200 in one connection to be increased, the number of connections can be reduced.

While certain embodiments have been described, these embodiments have been presented by way of example only, and are not intended to limit the scope of the inventions. Indeed, the novel embodiments described herein may be embodied in a variety of other forms; furthermore, various omissions, substitutions and changes in the form of the embodiments described herein may be made without departing from the spirit of the inventions. The accompanying claims and their equivalents are intended to cover such forms or modifications as would fall within the scope and spirit of the inventions. 

What is claimed is:
 1. A memory system comprising: an interface configured to connect to a plurality of initiators; a non-volatile memory; a storage configured to temporarily store a plurality of data items read in parallel from the memory for each predetermined unit in response to commands from the plurality of initiators; a connection manager configured to refer to a connection condition of the interface and detect an initiator being connected to the interface; and a controller configured to continuously transmit the plurality of data items of the predetermined unit to be transmitted to the initiator being connected from the storage based on an output from the connection manager regardless of a storing order from the memory in the storage.
 2. The memory system of claim 1, wherein the plurality of initiators comprise a first initiator and a second initiator, the storage is configured to store first data to be transmitted to the first initiator, second data to be transmitted to the second initiator and third data to be transmitted to the first initiator read from the memory and stored in the storage in this order, and the controller is configured to continuously transmit the first data and the third data to the first initiator when the connection manager detects that the first initiator is connected.
 3. The memory system of claim 1, wherein the plurality of initiators comprise a first initiator and a second initiator, the controller is configured to detect presence of data to be transmitted to the first initiator in the storage when the interface and the first initiator are connected in response to a request from the first initiator, and if data to be transmitted to the first initiator is present, the controller transmits the data to the first initiator.
 4. The memory system of claim 1, further comprising a command manager configured to manage the commands from the plurality of initiators and data stored in the storage in response to the commands in association with each other, wherein when transmitting a data item of the predetermined unit corresponding to a command to an initiator being connected, the controller continuously transmits another data item of the predetermined unit corresponding to the same command to the initiator being connected based on an output from the command manager.
 5. The memory system of claim 1, wherein the controller continuously transmits a plurality of data items corresponding to a plurality of commands and to be transmitted to an initiator being connected from the storage based on an output from the connection manager.
 6. The memory system of claim 1, further comprising a command manager configured to manage command information of the commands, wherein the command manager selects a command to be processed earliest based on at least a connection condition of the interface and the command information, and the controller transmits data stored in the storage in response to the selected command to an initiator being connected.
 7. The memory system of claim 6, wherein the command information includes elapsed time information indicating an elapsed time from reception of each of the commands, and the command manager selects a command to be processed earliest based on at least a connection condition of the interface and the elapsed time information.
 8. The memory system of claim 7, wherein the command manager selects a command with a largest elapsed time of commands from an initiator being connected as a command to be processed earliest.
 9. The memory system of claim 6, wherein the command manager manages the command information of the commands and storage information of data stored in the storage in response to the commands in association with each other, and selects a command to be processed earliest based on a connection condition of the interface, the command information and the storage information.
 10. The memory system of claim 9, wherein the storage information includes transferable amount information indicating a transferable amount of data stored in the storage in response to each of the commands, and the command manager selects a command to be processed earliest based on at least a connection condition of the interface and the transferable amount information.
 11. The memory system of claim 10, wherein the command manager selects a command with a largest transferable amount of commands from an initiator being connected as a command to be processed earliest. 